package com.example.tvidemo.mapper;

import com.example.tvidemo.entity.Permission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PermissionMapper {

    public List<Permission> findAll();

    public List<Permission> findByUserId(@Param("id") String id);

    public Permission findById(@Param("id") String id);

    public void addPermission(Permission permission);

    public void updatePermission(Permission permission);

    public void deletePermission(@Param("id") String id);

    public void authorizePermission(@Param("roleId") String roleId,@Param("permissionId") String permissionId);
}
